added samples
[windows-sources.git] / sdk / samples / all in on code / Visual Studio 2010 / CSWF4FlowChart / ReadNumberActivity.cs
blob38e240e779bd3ef2e15d251915912da4811497cc
1 /****************************** Module Header ******************************\
2 * Module Name: ReadNumberActivity.cs
3 * Project: CSWF4FlowChart
4 * Copyright (c) Microsoft Corporation.
5 *
6 * The class defines the ReadNumber activity.
7 *
8 * This source is subject to the Microsoft Public License.
9 * See http://www.microsoft.com/opensource/licenses.mspx#Ms-PL.
10 * All other rights reserved.
12 * THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
13 * EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
14 * WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
15 \***************************************************************************/
17 using System;
18 using System.Activities;
21 namespace CSWF4FlowChart
23 public sealed class ReadNumberActivity : CodeActivity
25 // Define an activity out argument of type int
26 public OutArgument<int> playerInputNumber { get; set; }
28 protected override void Execute(CodeActivityContext context)
30 playerInputNumber.Set(context, Int32.Parse(Console.ReadLine()));